package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 订单异常处理表
 * </p>
 *
 * @author whale
 * @since 2025-05-09
 */
@TableName("tb_order_exceptions")
public class OrderExceptions extends Model<OrderExceptions> {

    private static final long serialVersionUID = 1L;

    /**
     * 异常记录唯一标识
     */
    @TableId("exception_id")
    private Long exceptionId;
    /**
     * 订单ID
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 异常类型（0：超时未支付，1：库存不足）
     */
    @TableField("exception_type")
    private Integer exceptionType;
    /**
     * 处理状态（0：未处理，1：已处理）
     */
    @TableField("handled_status")
    private Integer handledStatus;
    /**
     * 处理人ID（关联用户表）
     */
    @TableField("handled_by")
    private Integer handledBy;
    /**
     * 处理时间
     */
    @TableField("handled_time")
    private Date handledTime;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public OrderExceptions(){
        this.exceptionId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getExceptionId() {
        return exceptionId;
    }

    public void setExceptionId(Long exceptionId) {
        this.exceptionId = exceptionId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getExceptionType() {
        return exceptionType;
    }

    public void setExceptionType(Integer exceptionType) {
        this.exceptionType = exceptionType;
    }

    public Integer getHandledStatus() {
        return handledStatus;
    }

    public void setHandledStatus(Integer handledStatus) {
        this.handledStatus = handledStatus;
    }

    public Integer getHandledBy() {
        return handledBy;
    }

    public void setHandledBy(Integer handledBy) {
        this.handledBy = handledBy;
    }

    public Date getHandledTime() {
        return handledTime;
    }

    public void setHandledTime(Date handledTime) {
        this.handledTime = handledTime;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "OrderExceptions{" +
        ", exceptionId=" + exceptionId +
        ", orderId=" + orderId +
        ", exceptionType=" + exceptionType +
        ", handledStatus=" + handledStatus +
        ", handledBy=" + handledBy +
        ", handledTime=" + handledTime +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
